﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PostControlPopup.aspx.cs" Inherits="Posts_PostControlPopup" ValidateRequest="false" Trace="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title><%=Title%></title>
    
    <link href="~/css/popUp.css" rel="stylesheet" type="text/css" media="screen" />

    <script src="../jquery/jquery.js" type="text/javascript"></script>

    <script src="../wymeditor/jquery.wymeditor.min.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }

        function returnToParent(hasSaved, ajaxId) {
            //create the argument that will be returned to the parent page
            var oArg = new Object();

            oArg.saved = hasSaved;
            oArg.ajaxId = ajaxId;

            //get a reference to the RadWindow
            var oWnd = GetRadWindow();

            //set the argument to the RadWindow
            oWnd.argument = oArg;
            //close the RadWindow            
            oWnd.close();
        }
   </script>
</head>
<body class="popup" style="background:#ffffff">
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="radScriptManager" runat="server" />
        <ajax:Accordion ID="contentControl" SkinID="SubTitle" runat="server">
            <HeaderTemplate>
                <%# Eval("Name") %>
            </HeaderTemplate>
            <ContentTemplate>
                <ul class="form">
                    <li class="first">
                        <asp:Label ID="lblNotesLabel" Text="Notes:" AssociatedControlID="lblNotes" runat="server" />
                        <asp:Label ID="lblNotes" Text='<%#Eval("Notes") %>' runat="server" />
                    </li>
                    <li>
                        <asp:Label ID="lblControlNotesLabel" Text='<%#Eval("TypeName", "{0} Notes") %>' AssociatedControlID="lblControlNotes" runat="server" />
                        <asp:Label ID="lblControlNotes" Text='<%#Eval("ControlNotes") %>' runat="server" />
                    </li>
                </ul> 
            </ContentTemplate>
        </ajax:Accordion>
        
        <div class="actions">
            <asp:LinkButton ID="btnSave" CssClass="actionBtn abSave" OnClick="btnSave_Click" runat="server">
                <div class="tl">
                    <div class="tr">
                        <div class="bl">
                            <div class="br">
                                <span>Save</span>
                            </div>
                        </div>
                    </div>
                </div>
            </asp:LinkButton>
            
            <asp:LinkButton ID="btnCancel" CssClass="actionBtn abCancel" OnClientClick="returnToParent(false);" runat="server">
                <div class="tl">
                    <div class="tr">
                        <div class="bl">
                            <div class="br">
                                <span>Cancel</span>
                            </div>
                        </div>
                    </div>
                </div>
            </asp:LinkButton>

        </div>
        <telerik:RadSpell ID="spell" runat="server" ButtonType="PushButton" ButtonText="Spell Check" DictionaryLanguage="en-GB" />
        <acms:AdminContentControlLoader ID="loader" Mode="Edit" runat="server" />
    </div>
    </form>
</body>
</html>
